import request from "@/utils/request";


export function register(data: any) {
    return request({
        url: `/api/user/register`,
        method: 'post',
        data: data
    })
}

export function getUserInfo() {
    return request({
        url: `/api/user/getUserInfo`,
        method: 'get',
    })
}

export function getUserList(data:any) {
    return request({
        url: `/api/user/list`,
        method: 'get',
        params:data,
    })
}

export function getUserInfoByid(id:Number) {
    return request({
        url: `/api/user/getUserInfo/`+id,
        method: 'get',
    })
}

export function deleteUser(id:Number) {
    return request({
        url: `/api/user/`+id,
        method: 'delete',
    })
}


export function updateUser(data: any) {
    return request({
        url: `/api/user/updateUserInfo`,
        method: 'put',
        data: data
    })
}


export function addUser(data: any) {
    return request({
        url: `/api/user/createUser`,
        method: 'post',
        data: data
    })
}



